package ar.com.ford.it.fullEconomics.facade;

import java.util.Collection;
import ar.com.ford.it.fullEconomics.exception.FullEconomicsException;
import ar.com.ford.it.fullEconomics.logic.ColorLogic;
import ar.com.ford.it.fullEconomics.persistence.dto.Ncas003ColorVw;


public class ColorFacade {
    
    /**
     * Busca todos los colores 
     * @return
     * @throws FullEconomicsException
     */
    public Collection<Ncas003ColorVw> findAllColor() throws FullEconomicsException{
        ColorLogic logic = new ColorLogic();
        return logic.findAllColor();

    }
    /**
     * Obtiene el objeto por el codigo
     * @param code
     * @return
     * @throws FullEconomicsException
     */
    public Ncas003ColorVw getColorById(String code)throws FullEconomicsException{
        ColorLogic logic = new ColorLogic();
        return logic.getColorById(code);        
    }
    
    public void mergeToObjCas(Ncas003ColorVw colorRead)throws FullEconomicsException{
        ColorLogic logic = new ColorLogic();
        logic.mergeToObjCas(colorRead);
    }
    
    public void createColor(Ncas003ColorVw colorRead)throws FullEconomicsException{
        ColorLogic logic = new ColorLogic();
        logic.createColor(colorRead);
    }

}
